package com.order.entity;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * Order entity. @author MyEclipse Persistence Tools
 */

@SuppressWarnings("serial")
public class Order implements java.io.Serializable {

	// Fields
	private Integer id;
	private String name;
	private String address;
	private Date createtime;
	private Set<Detail> details = new HashSet<Detail>(0);

	// Constructors
	/** default constructor */
	public Order() {
	}

	/** minimal constructor */
	public Order(String name, String address) {
		this.name = name;
		this.address = address;
	}

	/** full constructor */
	public Order(Integer id, String name, String address, Date createtime,
			Set<Detail> details) {
		super();
		this.id = id;
		this.name = name;
		this.address = address;
		this.createtime = createtime;
		this.details = details;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Set<Detail> getDetails() {
		return this.details;
	}

	public void setDetails(Set<Detail> details) {
		this.details = details;
	}

	@Override
	public String toString() {
		return "Order [id=" + id + ", name=" + name + ", address=" + address
				+ ", createtime=" + createtime + "]";
	}

}